<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><!-- 引入namespace页面不会报错 -->
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <h1>The Brand Page</h1>
        <form>
            <input type="text" name="name" />
            <input type="button" value="Search" onclick="doQueryBrands()"/>
        </form>
        <table>
            <thead>
                <tr>
                    <th>id</th>
                    <th>name</th>
                    <th>remark</th>
                    <th>createdTime</th>
                    <th>opreatiom</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="brand:${list}">
                    <td th:text="${brand.id}"></td>
                    <td th:text="${brand.name}"></td>
                    <td th:text="${brand.remark}"></td>
                    <td th:text="${brand.createdTime}"></td>
                    <td>
                        <button type="button">delete</button>
                        <button type="button">update</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <script>
        function doQueryBrands() {
            let name = document.forms[0].name.value;
            location.href = `http://localhost/brand/doFindBrands/${name}`;/* 反引号 */
        }
        /* let和var */
    </script>
</body>
</html>